Technical Q&As

DV 26 - Calling ataManager on a Power Macintosh
(Updated 21-September-98)

Q We're working on drivers for the ATA bus in Power Macintosh computers. However, we can't seem to find the link libraries on our ETO disks. The header libraries are there, but there is nothing to link to.

A Classic 68K code calls ATA Manager through inline trap glue and does not need a link library. CFM (PowerPC and CFM-68K) code needs to used Mixed Mode glue to call the ataManager trap. The following code should do:

#include <MixedMode.h>#include <Patches.h>#include <ATA.h> extern pascal SInt16 ataManager(ataPB *pb)
{
    return CallUniversalProc(
                GetToolboxTrapAddress(0xAAF1),
                kPascalStackBased
                | RESULT_SIZE(SIZE_CODE(sizeof(SInt16)))
                | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(pb))),
                pb);
}


--Vinnie Moscaritolo
-- Revised by Quinn "The Eskimo!"
Worldwide Developer Technical Support

Technical Q&As
Previous Question | Contents | Next Question

To contact us, please use the Contact Us page.